<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
     <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<h1>1 c:if</h1>

<c:if test="${param.username=='admin'}" var="result" scope="page">
	判断段结果:${result}<br />
	欢迎光临,管理员
</c:if>
<c:if test="${param.username!='admin'}" var="result" scope="page">
	判断段结果:${result}<br />
	欢迎光临,普通用户
</c:if>

<h1>2 c:choose</h1>
<c:set var="city" value="suzhou" scope="page"></c:set>

<c:choose>
	<c:when test="${city=='wuxi'}">
		无锡
	</c:when>
	<c:when test="${city=='suzhou'}">
		苏州
	</c:when>
	<c:when test="${city=='changzhou'}">
		常州
	</c:when>
	<c:otherwise>
		未知
	</c:otherwise>
</c:choose>
</body>
</html>